#ifndef INCLUDED_format_tools_HuffTools
#define INCLUDED_format_tools_HuffTools

#ifndef HXCPP_H
#include <hxcpp.h>
#endif

HX_DECLARE_CLASS0(IntHash)
HX_DECLARE_CLASS2(format,tools,HuffTools)
HX_DECLARE_CLASS2(format,tools,Huffman)
namespace format{
namespace tools{


class HuffTools_obj : public hx::Object{
	public:
		typedef hx::Object super;
		typedef HuffTools_obj OBJ_;
		HuffTools_obj();
		Void __construct();

	public:
		static hx::ObjectPtr< HuffTools_obj > __new();
		static Dynamic __CreateEmpty();
		static Dynamic __Create(hx::DynamicArray inArgs);
		~HuffTools_obj();

		HX_DO_RTTI;
		static void __boot();
		static void __register();
		void __Mark(HX_MARK_PARAMS);
		void __Visit(HX_VISIT_PARAMS);
		::String __ToString() const { return HX_CSTRING("HuffTools"); }

		virtual int treeDepth( ::format::tools::Huffman t);
		Dynamic treeDepth_dyn();

		virtual ::format::tools::Huffman treeCompress( ::format::tools::Huffman t);
		Dynamic treeCompress_dyn();

		virtual Void treeWalk( Array< ::format::tools::Huffman > table,int p,int cd,int d,::format::tools::Huffman t);
		Dynamic treeWalk_dyn();

		virtual ::format::tools::Huffman treeMake( ::IntHash bits,int maxbits,int v,int len);
		Dynamic treeMake_dyn();

		virtual ::format::tools::Huffman make( Array< int > lengths,int pos,int nlengths,int maxbits);
		Dynamic make_dyn();

};

} // end namespace format
} // end namespace tools

#endif /* INCLUDED_format_tools_HuffTools */ 
